Optimal. Leaf size=42 \[ x \sqrt{\frac{a}{x^2}+b}-\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{\frac{a}{x^2}+b}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0229586, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {1972, 242, 277, 217, 206} \[ x \sqrt{\frac{a}{x^2}+b}-\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{\frac{a}{x^2}+b}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1972
Rule 242
Rule 277
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \sqrt{\frac{a+b x^2}{x^2}} \, dx &=\int \sqrt{b+\frac{a}{x^2}} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{\sqrt{b+a x^2}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{b+\frac{a}{x^2}} x-a \operatorname{Subst}\left (\int \frac{1}{\sqrt{b+a x^2}} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{b+\frac{a}{x^2}} x-a \operatorname{Subst}\left (\int \frac{1}{1-a x^2} \, dx,x,\frac{1}{\sqrt{b+\frac{a}{x^2}} x}\right )\\ &=\sqrt{b+\frac{a}{x^2}} x-\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a}}{\sqrt{b+\frac{a}{x^2}} x}\right )\\ \end{align*}
Mathematica [A] time = 0.0280174, size = 62, normalized size = 1.48 \[ x \sqrt{\frac{a}{x^2}+b}-\frac{\sqrt{a} x \sqrt{\frac{a}{x^2}+b} \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a+b x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 61, normalized size = 1.5 \begin{align*}{x\sqrt{{\frac{b{x}^{2}+a}{{x}^{2}}}} \left ( \sqrt{b{x}^{2}+a}-\sqrt{a}\ln \left ( 2\,{\frac{\sqrt{a}\sqrt{b{x}^{2}+a}+a}{x}} \right ) \right ){\frac{1}{\sqrt{b{x}^{2}+a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.85997, size = 259, normalized size = 6.17 \begin{align*} \left [x \sqrt{\frac{b x^{2} + a}{x^{2}}} + \frac{1}{2} \, \sqrt{a} \log \left (-\frac{b x^{2} - 2 \, \sqrt{a} x \sqrt{\frac{b x^{2} + a}{x^{2}}} + 2 \, a}{x^{2}}\right ), x \sqrt{\frac{b x^{2} + a}{x^{2}}} + \sqrt{-a} \arctan \left (\frac{\sqrt{-a} x \sqrt{\frac{b x^{2} + a}{x^{2}}}}{b x^{2} + a}\right )\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{a + b x^{2}}{x^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.24815, size = 92, normalized size = 2.19 \begin{align*}{\left (\frac{a \arctan \left (\frac{\sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} + \sqrt{b x^{2} + a}\right )} \mathrm{sgn}\left (x\right ) - \frac{{\left (a \arctan \left (\frac{\sqrt{a}}{\sqrt{-a}}\right ) + \sqrt{-a} \sqrt{a}\right )} \mathrm{sgn}\left (x\right )}{\sqrt{-a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]